<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>仪表盘 - 管理后台</title>
    <link th:href="@{/admin/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/admin/css/bootstrap-icons.css}" rel="stylesheet">
    <link th:href="@{/admin/css/admin.css}" rel="stylesheet">
</head>
<body>
    <!-- 顶部导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container-fluid">
            <a class="navbar-brand" th:href="@{/admin}">
                <i class="bi bi-gear-fill me-2"></i>口语练习管理后台
            </a>
        </div>
    </nav>

    <div class="container-fluid">
        <div class="row">
            <!-- 侧边栏 -->
            <div class="col-md-2 bg-light sidebar">
                <div class="position-sticky pt-3">
                    <ul class="nav nav-pills flex-column">
                        <li class="nav-item">
                            <a th:href="@{/admin}" class="nav-link active">
                                <i class="bi bi-house-door me-2"></i>仪表盘
                            </a>
                        </li>
                        <li class="nav-item">
                            <a th:href="@{/admin/users}" class="nav-link">
                                <i class="bi bi-people me-2"></i>用户管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a th:href="@{/admin/exam-papers}" class="nav-link">
                                <i class="bi bi-file-text me-2"></i>试卷管理
                            </a>
                        </li>
                        <li class="nav-item">
                            <a th:href="@{/admin/classes}" class="nav-link">
                                <i class="bi bi-building me-2"></i>班级管理
                            </a>
                        </li>
                    </ul>
                </div>
            </div>

            <!-- 主内容 -->
            <main class="col-md-10 ms-sm-auto px-md-4">
                <div class="pt-3 pb-2 mb-3 border-bottom">
                    <h1 class="h2">系统概览</h1>
                </div>

                <!-- 统计卡片 -->
                <div class="row">
                    <div class="col-xl-3 col-md-6 mb-4">
                        <div class="card border-left-warning shadow h-100 py-2">
                            <div class="card-body">
                                <div class="row no-gutters align-items-center">
                                    <div class="col mr-2">
                                        <div class="text-xs font-weight-bold text-warning text-uppercase mb-1">
                                            待审核用户
                                        </div>
                                        <div class="h5 mb-0 font-weight-bold text-gray-800" th:text="${pendingCount}">0</div>
                                    </div>
                                    <div class="col-auto">
                                        <i class="bi bi-people fa-2x text-gray-300"></i>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xl-3 col-md-6 mb-4">
                        <div class="card border-left-primary shadow h-100 py-2">
                            <div class="card-body">
                                <div class="row no-gutters align-items-center">
                                    <div class="col mr-2">
                                        <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">
                                            待审核学生
                                        </div>
                                        <div class="h5 mb-0 font-weight-bold text-gray-800" th:text="${pendingStudents}">0</div>
                                    </div>
                                    <div class="col-auto">
                                        <i class="bi bi-mortarboard fa-2x text-gray-300"></i>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xl-3 col-md-6 mb-4">
                        <div class="card border-left-success shadow h-100 py-2">
                            <div class="card-body">
                                <div class="row no-gutters align-items-center">
                                    <div class="col mr-2">
                                        <div class="text-xs font-weight-bold text-success text-uppercase mb-1">
                                            待审核教师
                                        </div>
                                        <div class="h5 mb-0 font-weight-bold text-gray-800" th:text="${pendingTeachers}">0</div>
                                    </div>
                                    <div class="col-auto">
                                        <i class="bi bi-person-badge fa-2x text-gray-300"></i>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-xl-3 col-md-6 mb-4">
                        <div class="card border-left-info shadow h-100 py-2">
                            <div class="card-body">
                                <div class="row no-gutters align-items-center">
                                    <div class="col mr-2">
                                        <div class="text-xs font-weight-bold text-info text-uppercase mb-1">
                                            系统状态
                                        </div>
                                        <div class="h5 mb-0 font-weight-bold text-gray-800">正常运行</div>
                                    </div>
                                    <div class="col-auto">
                                        <i class="bi bi-check-circle fa-2x text-gray-300"></i>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 快捷操作 -->
                <div class="row">
                    <div class="col-lg-6">
                        <div class="card shadow mb-4">
                            <div class="card-header py-3">
                                <h6 class="m-0 font-weight-bold text-primary">快捷操作</h6>
                            </div>
                            <div class="card-body">
                                <div class="d-grid gap-2">
                                    <a th:href="@{/admin/users}" class="btn btn-primary">
                                        <i class="bi bi-people me-2"></i>用户管理
                                    </a>
                                    <a th:href="@{/admin/classes}" class="btn btn-success">
                                        <i class="bi bi-building me-2"></i>班级管理
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </main>
        </div>
    </div>

    <script th:src="@{/admin/js/bootstrap.bundle.min.js}"></script>
</body>
</html>